from public.action import *
from public.business import *
from public.testData import *
from public.tools import *
testCase = "DBshop028_删除标签组"
firefox=openBrowser(urlAdmin)
DBshopLoginAdmin(firefox) #调用函数登录dbshop的后台
DBshopEnterMenu3(firefox,'商品管理','商品标签','商品标签分组')
# 1.点击“删除”按钮，确认删除，删除成功。
firefox.find_element_by_xpath('//td[contains(.,"华为老大")]/following-sibling::td[4]/a[2]').click()
firefox.switch_to.alert.accept()
#断言
try:
    firefox.find_element_by_xpath('//td[contains(.,"华为老大")]').is_displayed()
    writeLog("%s 测试通过"%testCase)
except:
    writeLog("%s 测试失败" % testCase)
    getPhoto(firefox)
firefox.quit()